extends TileMapLayer
class_name HighlightLayer

var selected_node2d:Node2D
var selected_node2d_cell:Vector2i

##高亮地块
func highlight_cell(cell:Vector2i)->void:
	set_cell(cell,0,Vector2i(1, 0))
##高亮多个地块
func highlight_cells(_cell_array :Array[Vector2i]) ->void:
	for cell in _cell_array:
		highlight_cell(cell)
##该方法供外部调用以擦除多个单元格的高亮
func erase_cells(cells:Array[Vector2i]):
	for cell in cells:
		erase_cell(cell)
